To realize a semiconductor memory device capable of high-density recording and the like, digital data error-correcting codes are being developed now. Error-correcting codes can be roughly classified into an algebraic error-correcting method and an error-correcting method using iterative calculations based on probability. It has been reported that low-density parity check (LDPC) codes belonging to the latter have a superior performance that approaches the Shannon limit.